<?php
/**
 * Created by PhpStorm.
 * User: wanghaibo
 * Date: 17/4/28
 * Time: 09:10
 */

namespace Api\Controller;


use Common\Controller\AdminbaseController;

class MapadminController extends AdminbaseController
{
    public function index(){
        $do = I('get.do');
        switch ($do){
            case 1:
                $ip = I('get.ip');
                $point = getCoor($ip);
                $point = $point['content']['point'];
            break;
            case 2:
                $xyz = I('get.xyz');
                $point = explode(',',$xyz);
                $point = array(
                    'x' =>  $point[0],
                    'y' =>  $point[1]
                );


        }
        $this->assign("lng",$point['x']);
        $this->assign("lat",$point['y']);
        $this->display();
    }
}